import I18N from "@/i18n/index.ts"
import router from "@/router/index"
/**
 * 设置语言
 * */
export default function setLang(index:number):void{
    if(index == 0){
        localStorage.setItem("lang","en");
        I18N.global.locale = "en";
    }else{
        localStorage.setItem("lang","zh");
        I18N.global.locale = "zh"
    }
    router.go(0);
}

